

function getCurrentTime() {
	var now = new Date();
	var year = now.getFullYear(); // 年
	var month = now.getMonth() + 1; // 月
	var day = now.getDate(); // 日
	var hh = now.getHours(); // 时
	var mm = now.getMinutes(); // 分
	var ss = now.getSeconds(); // 分
	var clock = year + "/";
	clock += (month < 10) ? "0" + month + "/" : month + "/";
	clock += (day < 10) ? "0" + day + " " : day + " ";
	clock += (hh < 10) ? "0" + hh + ":" : hh + ":";
	clock += (mm < 10) ? "0" + mm + ":" : mm + ":";
	clock += (ss < 10) ? "0" + ss : ss;
	return (clock);
}

function getInnerHTML(nodes) {
	if (navigator.userAgent.indexOf("Firefox") > 0) {
		return GetFireFoxInnerHTML(nodes);
	} else {
		return GetChormeInnerHTML(nodes);
	}
}
function GetFireFoxInnerHTML(nodes) {
	var result = '';
	var node;
	for ( var i = 0; i < nodes.length; i++) {
		node = nodes[i];
		if (node.nodeValue) {
			result += node.nodeValue;
		} else if (node.tagName) {
			result += "<" + node.tagName;
			if (node.innerHTML) {
				if (node.attributes && node.attributes.length > 1) {
					for ( var j = 0; j < node.attributes.length - 1; j++) // 忽略最后一个。
					{
						result += ' ' + node.attributes[j].name + "='"
								+ node.attributes[j].value + "'";
					}
				}
				result += ">" + node.innerHTML + "</" + node.tagName + ">";
			} else {
				result += " />";
			}
		}
	}
	return result;
}
function GetChormeInnerHTML(nodes) {
	var result = '';
	var node = null;
	for ( var i = 0; i < nodes.length; i++) {
		node = nodes[i];
		if (node.outerHTML) {
			result += node.outerHTML;
		} else if (node.nodeValue) {
			result += node.nodeValue;
		}
	}
	return result.replace("<div><br></div>","<br>");
}
